RIFFFile.setSignature   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 6
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
dl 0
loc 6
rs 10
c 0
b 0
f 0
1
// Type definitions for riff-file 1.0
2
// Project: https://github.com/rochars/riff-file
3
// Definitions by: Rafael S. Rocha <https://github.com/rochars>
4
// Definitions: https://github.com/rochars/riff-file
5
6
export = riffFile;
7
8
declare module riffFile {
9
10
  class RIFFFile {
11
12
    /**
13
     * The container identifier.
14
     * @type {string}
15
     */
16
    container: string;
17
18
    /**
19
     * The main chunk size, in bytes.
20
     * @type {number}
21
     */
22
    chunkSize: number;
23
24
    /**
25
     * The format identifier.
26
     * @type {string}
27
     */
28
    format: string;
29
30
    /**
31
     * An object representing the signature of all chunks in the file.
32
     * @type {!Object<string, *>}
33
     */
34
    signature: object;
35
36
    /**
37
     * Read the signature of the chunks in a RIFF/RIFX file.
38
     * @param {!Uint8Array} bytes The buffer.
39
     */
40
    setSignature(bytes: Uint8Array): void;
41
42
    /**
43
     * Find a chunk by its fourCC_ in a array of RIFF chunks.
44
     * @param {string} chunkId The chunk fourCC_.
45
     * @param {boolean} multiple True if there may be multiple chunks
46
      *    with the same chunkId.
47
     * @return {Object}
48
     */
49
    findChunk(chunkId: string, multiple?: boolean): object;
50
  }
51
}